home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d17
/
font.arc
/
TEXT.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1987-02-27
|
2KB
|
94 lines
type
string8 = string[8];
textstring = string[120];
var
chset : array[32..126,0..11] of integer;
WIDTH : integer;
procedure readset(fname : string8);
var num, i, j : integer;
fp : text;
begin
assign(fp,fname + '.fnt');
reset(fp);
for i := 33 to 126 do
for j := 0 to 11 do
begin
readln(fp,num);
chset[i,j] := num;
end;
end;
procedure text(x,y : integer; str : textstring);
var ch,i,j : integer;
begin
for i := 1 to length(str) do
begin
ch := ord(str[i]);
if (ch <> 32) then
for j := 1 to 11 do
begin
if (chset[ch,j] and 1 = 1)
then plot(x+j,y+7,1);
if (chset[ch,j] and 2 = 2)
then plot(x+j,y+6,1);
if (chset[ch,j] and 4 = 4)
then plot(x+j,y+5,1);
if (chset[ch,j] and 8 = 8)
then plot(x+j,y+4,1);
if (chset[ch,j] and 16 = 16)
then plot(x+j,y+3,1);
if (chset[ch,j] and 32 = 32)
then plot(x+j,y+2,1);
if (chset[ch,j] and 64 = 64)
then plot(x+j,y+1,1);
if (chset[ch,j] and 128 = 128)
then plot(x+j,y,1);
end;
x := x + WIDTH;
end
end;
begin
readset('ibmset');
Hires;
WIDTH := 10;
Text( 1, 1,'This is an example of the standard font which');
Text( 1,11,'loaded when you initially run FontEdit');
readset('lq');
Text( 1,31,'This is an example of the letter quality font');
Text( 1,41,'This font is called "lq"');
readset('italic');
Text( 1,61,'This is the italic font');
readset('cursive');
Text( 1,81,'This is the cursive font (needs work though!)');
readset('fat');
Text( 1,101,'This is the FAT font');
readset('lq');
Text( 1,121,'Characters with extenders; g,j,p,q,y do not extend below');
Text( 1,131,'the line where they should be drawn. Will be fixed in ');
Text( 1,141,'future versions');
readset('small');
WIDTH := 6;
Text( 1,161,'This is the small font which allows you to display up to forty more characters than normal (needs work)');
Text( 1,171,'and is not yet complete. Numbers are not defined, and will overlap when plotted');
readln;
end.